﻿<template>
 <div class="weui-msg">
    <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
    <div class="weui-msg__text-area">
        <h2 class="weui-msg__title">操作成功</h2>
        <p class="weui-msg__desc">商户入驻资料提交成功，我们将在10分钟内反馈审核结果并发送消息给你，请留意！</p>
    </div>
    <div class="weui-msg__opr-area">
        <div class="weui-btn-area">
            <a>为确保能正常接受到审核消息<br/> 请点击下方按钮下载app</a>
            <a href="javascript:void(0);" class="weui-btn weui-btn_primary" @touchstart.stop.prevent="handleClickDownloadApp" style="margin-top: 10px">点击下载app</a>
        </div>
    </div>
    <div class="weui-msg__extra-area">
        <div class="weui-footer">
            <p class="weui-footer__links">
                <a href="javascript:void(0);" class="weui-footer__text">重庆嗨客网络科技有限公司</a>
            </p>
            <p class="weui-footer__text">Copyright &copy; 2018 yx.uphicoo.com</p>
        </div>
    </div>
</div>
</template>

<script>
  export default {
    name: 'success',
    methods: {
      handleClickDownloadApp(e) {
        e.preventDefault()
        const u = navigator.userAgent, app = navigator.appVersion; 
        const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 
        const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 
        if (isAndroid) {
            location.href = 'http://sj.qq.com/myapp/detail.htm?apkName=com.hk.hicoo'
        }
        if (isiOS) {
            location.href = 'https://itunes.apple.com/cn/app/%E5%97%A8%E5%AE%A2%E5%B0%8F%E6%8E%8C%E6%9F%9C/id1389820058?mt=8'
        }
      }
    }
  }
</script>
